/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartBodyFatScale {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010060006';
    }

    get categoryName() {
        return '\u667a\u80fd\u4f53\u8102\u79e4';
    }

    getBodyFatPercentage(params) {
        return command({
            method: 'getBodyFatPercentage',
            methodId: 'p1vZOVMl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMuscleMass(params) {
        return command({
            method: 'getMuscleMass',
            methodId: 'pGoxGSwK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pUPQoZ2n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWeightValue(params) {
        return command({
            method: 'getWeightValue',
            methodId: 'pZgRqLZM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH39rQE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setToDefault(params) {
        return command({
            method: 'setToDefault',
            methodId: 'ppAXzdu9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setUserInformation(params) {
        return command({
            method: 'setUserInformation',
            methodId: 'pgh07Jbm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartBodyFatScale;
